Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable early-return and superfluous-else from revive #19152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Jan 9, 2025

Description

early-return: In Go it is idiomatic to minimize nesting statements, a typical example is to avoid if-then-else constructions.

superfluous-else: To improve the readability of code, it is recommended to reduce the indentation as much as possible. This rule highlights redundant else-blocks that can be eliminated from the code.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mmorel-35
Once this PR has been reviewed and has the lgtm label, please assign jmhbnz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 52.63158% with 9 lines in your changes missing coverage. Please review.

Project coverage is 68.89%. Comparing base (0f172d4) to head (1180239).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
server/etcdserver/api/v2store/store.go 33.33% 2 Missing and 2 partials ⚠️
etcdctl/ctlv3/command/check.go 0.00% 3 Missing ⚠️
etcdctl/ctlv3/ctl.go 0.00% 2 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
pkg/flags/selective_string.go 100.00% <100.00%> (ø)
server/etcdserver/cluster_util.go 66.17% <100.00%> (-0.50%) ⬇️
server/proxy/grpcproxy/watcher.go 91.83% <100.00%> (-0.17%) ⬇️
server/storage/mvcc/watchable_store.go 93.89% <100.00%> (-0.02%) ⬇️
etcdctl/ctlv3/ctl.go 0.00% <0.00%> (ø)
etcdctl/ctlv3/command/check.go 0.00% <0.00%> (ø)
server/etcdserver/api/v2store/store.go 83.87% <33.33%> (-0.05%) ⬇️

... and 21 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19152      +/-   ##
==========================================
+ Coverage   68.77%   68.89%   +0.12%     
==========================================
  Files         420      420              
  Lines       35649    35642       -7     
==========================================
+ Hits        24518    24556      +38     
+ Misses       9704     9667      -37     
+ Partials     1427     1419       -8     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f172d4...1180239. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants